<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="newtemplatesfiles5/img/favicon.html">
    <meta http-equiv="refresh" content="8">
    <title>魔晶</title>

    <!-- Bootstrap core CSS -->
    <link href="newtemplatesfiles5/css/bootstrap.min.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="newtemplatesfiles5/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="newtemplatesfiles5/css/style.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="newtemplatesfiles5/js/html5shiv.js"></script>
    <script src="newtemplatesfiles5/js/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<section id="container" class="">

    <section id="main-content">
        <section class="wrapper">
            <!-- page start-->
            <div class="row">
                <div class="col-lg-6">
                    <section class="panel">
                        <header class="panel-heading">
                            欢迎来到我们的世界！
                        </header>
                        <div class="chat-form">
                            <form id="myForm">
                                <div class="input-cont ">
                                    <input id="text" name="text" type="text" class="form-control col-lg-12" placeholder="输入要发送的内容。。。">
                                </div>
                            </form>

                            <div class="form-group">
                                <div class="pull-right chat-features">
                                    <button onclick="toSend()" class="btn btn-danger">Send</button>
                                </div>
                            </div>

                        </div>
                        <div class="panel-body profile-activity">
                            <tr th:each="emp:${session.myMessageList}">
                                <div class="activity terques">
                                  <span>
                                      <i class="icon-shopping-cart"></i>
                                  </span>
                                    <div class="activity-desk">
                                        <div class="panel">
                                            <div class="panel-body">
                                                <div class="arrow"></div>
                                                <i class=" icon-time"></i>
                                                <h4 th:text="${emp.dateAndTime}">10:45 AM</h4>
                                                <p th:text="${emp.text}"></p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </tr>
                        </div>
                    </section>

                </div>

            </div>
            <script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
            <script type="text/javascript" src="js/jquery.min.js"></script>
            <script src="asserts/js/popper.min.js"></script>
            <script src="asserts/js/feather.min.js"></script>
            <script src="asserts/js/bootstrap.min.js"></script>

        </section>
    </section>
    <!--main content end-->
</section>

<!-- js placed at the end of the document so the pages load faster -->
<script src="newtemplatesfiles5/js/jquery.js"></script>
<script src="newtemplatesfiles5/js/bootstrap.min.js"></script>
<script src="newtemplatesfiles5/js/jquery.scrollTo.min.js"></script>
<script src="newtemplatesfiles5/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="newtemplatesfiles5/assets/jquery-knob/js/jquery.knob.js"></script>

<!--common script for all pages-->
<script src="newtemplatesfiles5/js/common-scripts.js"></script>

<script>


    function toSend(){
      var myform = document.getElementById("myForm");
      var form = new FormData(myform);
      $.ajax({
          url:"send.do",
          type:"post",
          dataType:"html",
          data:form,
          cache:false,
          processData:false,
          contentType:false,
          success: function (data) {
              console.log(data);
              location.href="aa-mojing";

          },
          error:function (data) {
              console.log(data);
          }


      })

    };

    //knob
    $(".knob").knob();

</script>


</body>
</html>
